package org.zwd.computePrice.domain;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;

public class Order {
	private String id;
	private List<Crab> crabList = new ArrayList<Crab>();
	private String clientName;
	private String date;
	private double totalNumber;
	private double totalMaleNum;
	private double totalFemaleNum;
	private int totalPay;
	private int realPay;
	private String meanPrice;
	private User user;
	private int isOrder;
	 
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	public List<Crab> getCrabList() {
		return crabList;
	}
	public void setCrabList(List<Crab> crabList) {
		this.crabList = crabList;
	}
	
	public String getClientName() {
		return clientName;
	}
	public void setClientName(String clientName) {
		this.clientName = clientName;
	}
	public int getTotalPay() {
		return totalPay;
	}
	
	public String getDate() {
		return date;
	}
	public void setDate(String date) {
		this.date = date;
	}
	public double getTotalNumber() {
		return totalNumber;
	}
	public void setTotalNumber(double totalNumber) {
		this.totalNumber = totalNumber;
	}
	public double getTotalMaleNum() {
		return totalMaleNum;
	}
	public void setTotalMaleNum(double totalMaleNum) {
		this.totalMaleNum = totalMaleNum;
	}
	public double getTotalFemaleNum() {
		return totalFemaleNum;
	}
	public void setTotalFemaleNum(double totalFemaleNum) {
		this.totalFemaleNum = totalFemaleNum;
	}
	public void setTotalPay(int totalPay) {
		this.totalPay = totalPay;
	}
	
	public int getRealPay() {
		return realPay;
	}
	public void setRealPay(int realPay) {
		this.realPay = realPay;
	}
	
	public String getMeanPrice() {
		double mean = totalPay/totalNumber;
		DecimalFormat df = new DecimalFormat("###,###.00");
		meanPrice = df.format(mean);
		return meanPrice;
	}
	
	public User getUser() {
		return user;
	}
	
	public void setUser(User user) {
		this.user = user;
	}
	public int getIsOrder() {
		return isOrder;
	}
	public void setIsOrder(int isOrder) {
		this.isOrder = isOrder;
	}

}
